const { createStore } = require("redux");

const initialState = {
    open: true
}

function reduce(state =initialState, action) {
    if (!action.value) {
        console.log('发生变更，value为null返回初始值', action)
        return state;
    }
    return {...state, [action.type]: action.value};
}

const store = createStore(reduce);

module.exports = store